* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #2c3e50;
    margin: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

header h1 {
    color: #3498db;
    font-size: 2em;
    margin-bottom: 2px;
    font-weight: 600;
}

header h2 {
    color: #7f8c8d;
    font-size: 1em;
    font-weight: normal;
}

.synopsis-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.synopsis-section textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: none;
    font-size: 14px;
    line-height: 1.6;
    transition: border-color 0.3s ease;
}

.synopsis-section textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.mode-tabs {
    display: flex;
    background: white;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mode-tab {
    padding: 8px 20px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

.mode-tab.active {
    background: #3498db;
    color: white;
}

.mode-tab:hover:not(.active) {
    background: #f5f6f7;
}

.content-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    max-height: 800px;
    height: auto;
}

.content-area {
    display: flex;
    gap: 20px;
    flex: 1;
    overflow: hidden;
}

.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.left-panel-input {
    width: 100%;
    height: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: none;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s ease;
    background: white;
}

.left-panel-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

#chunkContainer {
    flex: 2;
    overflow-y: auto;
    padding-right: 10px;
}

.column-headers {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 0 10px;
}

.show-left-panel .column-headers {
    padding-left: 0;
}

.left-header, .right-header {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.chunk-container {
    display: flex;
    gap: 20px;
    margin-bottom: 0px;
    position: relative;
    padding: 5px 0 5px 10px;
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease;
    user-select: none;
    pointer-events: none;
}

.chunk-container.selected {
    background: transparent;
    border-left-color: #3498db;
}

.x-item, .y-item, .revision-item {
    flex: 1;
    position: relative;
}

.x-item.hidden, .y-item.hidden {
    display: none;
}

.revision-item {
    display: none;
}

.revision-item.visible {
    display: block;
}

.x-input, .y-input, .revision-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: none;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s ease;
    overflow: hidden;
    height: auto;
    background: white;
    pointer-events: auto;
}

.x-input:focus, .y-input:focus, .revision-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.y-input, .revision-input {
    background: #f8f9fa;
}

.revision-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.revision-actions.hidden {
    display: none;
}

.accept-btn, .reject-btn {
    padding: 4px 12px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.accept-btn {
    background: #2ecc71;
}

.accept-btn:hover {
    background: #27ae60;
    transform: translateY(-1px);
}

.reject-btn {
    background: #e74c3c;
}

.reject-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.chunk-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: none;
    gap: 4px;
    pointer-events: auto;
    z-index: 10;
}

.chunk-container:focus-within .chunk-actions {
    display: flex;
}

.add-x-btn, .delete-x-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.add-x-btn {
    background: #3498db;
}

.add-x-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.delete-x-btn {
    background: #e74c3c;
}

.delete-x-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.prompt-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.prompt-input {
    margin-top: 20px;
}

.prompt-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 18px;
}

.prompt-input textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: none;
    font-size: 14px;
    line-height: 1.6;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.prompt-input textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
    background-color: white;
}

.prompt-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-top: 5px;
}

.dropdown-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dropdown select, .select-wrapper select {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 120px;
    background: white;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232c3e50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.dropdown select:hover, .select-wrapper select:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.dropdown select:focus, .select-wrapper select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    min-width: 140px;
}

.action-btn {
    padding: 12px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.2);
}

.action-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.column-header-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn {
    padding: 4px 8px;
    background: #f0f2f5;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #e4e6e9;
    color: #333;
    transform: translateY(-1px);
    border-color: #d0d0d0;
}

.batch-actions {
    display: flex;
    gap: 10px;
}

.batch-actions.hidden {
    display: none;
}

.batch-accept-btn,
.batch-reject-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batch-accept-btn {
    background: #2ecc71;
}

.batch-accept-btn:hover {
    background: #27ae60;
    transform: translateY(-1px);
}

.batch-reject-btn {
    background: #e74c3c;
}

.batch-reject-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.model-select {
    min-width: 100px !important;
}

.mode-chapter-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    margin: 0;
    height: 45px;
}

.mode-selection {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.chapter-selection {
    position: absolute;
    left: calc(75%);
    transition: opacity 0.3s ease;
}

.chapter-selection.hidden {
    opacity: 0;
    pointer-events: none;
}

.chapter-selection .select-wrapper select {
    min-width: 100px;
    padding: 8px 15px;
}
 